package People;

import java.util.Arrays;

public class PeopleList {
    People[] peoples = new People[10];
    private  int size;


    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }
    public void setPeople(People man,int i){
        peoples[i] = man;
    }
    public People getPeople(int i){
        return peoples[i];
    }
    //扩容
    public void check(){
        if(getSize()== peoples.length){
            Arrays.copyOf(peoples,2*getSize());
        }
    }
}
